﻿@using Dignite.Abp.Data
@using Dignite.Cms.Public.Web.Models;
@using Dignite.Abp.DynamicForms;
@using Dignite.FileExplorer.Files;

@model EntryFieldViewModel
@{
    var files = Model.Entry.GetField<List<FileDescriptorDto>>(Model.Field.Name);
    FileDescriptorDto coverImage = (files != null && files.Any()) ? files[0] : null;
}
@if (coverImage != null)
{
    <div class="mb-5 ">
        <img src="@($"/api/file-explorer/files/{coverImage.ContainerName}/{coverImage.BlobName}?width=800")" class="img-fluid rounded" alt="@coverImage?.Name">
    </div>
}